local function getupvaluetable(func, inname)
	local i = 1
	while true do
		local name, value = debug.getupvalue(func, i)
		if name == nil then
			return
		end
        
        if name == inname then
            return i,value
        end
        
		i=i+1
	end
end

local client = _P.client
print('ffffffff',tostring_r(client))


-- local i = {}
-- local function test_i()
--     print(i)
-- end

-- local function modify_i()
--     i = 10
-- end

-- local j = {}
-- local function test_j()
--     print(j)
-- end

-- local function modify_j()
--     j = 20
-- end

-- test_i()
-- modify_i()
-- test_i()

-- test_j()
-- modify_j()
-- test_j()

-- local j_index = getupvaluetable(test_j,'j')
-- local i_index = getupvaluetable(test_i,'i')

-- -- debug.upvaluejoin(test_j,j_index,test_i,i_index)
-- debug.setupvalue(test_j,j_index,i)
-- print('now change i')
-- i = 1024

-- test_i()
-- test_j()
